var oper = {}
oper.init = function(){
	oper.changeScanImgPos();
	oper.bindLinkJkChangeColor();
	$(window).resize(oper.changeScanImgPos);
}

$(document).ready(oper.init);

oper.changeScanImgPos = function(){
	var target = $('.right-links .xd');
	var imgScan = $('.buy-scan img');
	var objScan = $('.buy-scan object');
	var right = target.offset().left + target.outerWidth(true) - imgScan.outerWidth(true);
	objScan.css("left",right +"px")
}
oper.bindLinkJkChangeColor = function(){
	$('.right-links .jk').hover(function(){
		oper.changeLinksColor($(this),$(".right-links").children());
	},oper.resetLinksColor);
	$('.right-links .qc').hover(function(){
		oper.changeLinksColor($(this),$(".right-links").children());
	},oper.resetLinksColor);
	$('.right-links .xd').hover(function(){
		oper.changeLinksColor($(this),$(".right-links").children());
	},oper.resetLinksColor);
}
oper.changeLinksColor = function(e_active,e_leaves){
	$.each(e_leaves,function(){
		$(this).removeClass("active");
	});
	e_active.addClass("active");
}
oper.resetLinksColor = function(){
	oper.changeLinksColor($('.right-links .jk'),$(".right-links").children());
}